package com.yiya.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yiya.bean.CompanyUserInfo;
import com.yiya.mapper.CompanyUserInfoMapper;

@Service("companyUserInfoService")
public class CompanyUserInfoService {
	@Autowired
	private CompanyUserInfoMapper cpyUserInfoMapper;
	
	public int add(CompanyUserInfo bean){
		return cpyUserInfoMapper.insert(bean);
	}
	
	public int update(CompanyUserInfo bean){
		return cpyUserInfoMapper.updateByPrimaryKeySelective(bean);
	}
	
	public CompanyUserInfo queryById(Integer id){
		return cpyUserInfoMapper.selectByPrimaryKey(id);
	}
	
	public int updaeBySelective(CompanyUserInfo bean){
		return cpyUserInfoMapper.updateByPrimaryKeySelective(bean);
	}

	public CompanyUserInfo queryByUserId(Integer id){
		return cpyUserInfoMapper.selectByUserId(id);
	}
	
	public int getCpyUserInfoCountByUserId(Integer id){
		return cpyUserInfoMapper.getCpyUserInfoCountByUserId(id);
	}
}
